cmake_minimum_required(VERSION 3.22)

project(cbb)
add_library(cbb INTERFACE)

enable_language(C ASM)

add_subdirectory(cbb_init)
add_subdirectory(cbb_delay)
add_subdirectory(cbb_bit)
add_subdirectory(cbb_mem)
add_subdirectory(cbb_event)
add_subdirectory(cbb_verify)
add_subdirectory(cbb_protocol)

target_link_libraries(${CMAKE_PROJECT_NAME}
    cbb_init
    cbb_delay
    cbb_bit
    cbb_mem
    cbb_event
    cbb_verify
    cbb_protocol
)

target_include_directories(cbb INTERFACE
)

target_sources(cbb INTERFACE
)

if(CMAKE_C_STANDARD LESS 11)
    message(ERROR "Generated code requires C11 or higher")
endif()
